package com.cdm.forum.exception;

import com.cdm.forum.common.Result;

/**
 * 自定义异常
 */
public class ApplicationException extends RuntimeException {
    //自定义错误
    protected Result errorResult;

    public ApplicationException(Result errorResult) {
        super(errorResult.getMassage());
        this.errorResult = errorResult;
    }

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationException(Throwable cause) {
        super(cause);
    }

    public Result getErrorResult() {
        return errorResult;
    }

}
